<script setup>
import { ref } from 'vue'
import { myCartListService } from '@/api/cate'
const channels = ref([])

const getChannels = async () => {
  const res = await myCartListService()
  channels.value = res.data
}

getChannels()

defineProps({
  mv: {
    type: [Number, String]
  },
  width: {
    type: String
  }
})

const emits = defineEmits(['update:mv'])
</script>
<template>
  <el-select
    :modelValue="mv"
    @update:modelValue="emits('update:mv', $event)"
    :style="{ width }"
  >
    <el-option
      v-for="e in channels"
      :key="e.id"
      :label="e.cate_name"
      :value="e.id"
    ></el-option>
  </el-select>
</template>

<style lang="scss" scoped></style>
